package server.business.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import lombok.Data;

/**
 * 
 * @TableName transfusion_clinic
 * @author Galaxy
 */
@TableName(value = "transfusion_clinic")
@Data
public class TransfusionClinic implements Serializable {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "gmt_create", fill = FieldFill.INSERT) // 创建注解
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE) // 更新注解
    private Date gmtModified;

    /**
     * 病案号
     */
    @TableField(value = "medical_record_number")
    private String medicalRecordNumber;

    /**
     * 输血申请单号
     */
    @TableField(value = "transfusion_number")
    private String transfusionNumber;

    /**
     * 受血者身份证号
     */
    @TableField(value = "patient_idcard")
    private String patientIdcard;

    /**
     * 临床诊断
     */
    @TableField(value = "clinical_diagnosis")
    private String clinicalDiagnosis;

    /**
     * 输血目的
     */
    @TableField(value = "transfusion_purpose")
    private String transfusionPurpose;

    /**
     * 输血类型
     */
    @TableField(value = "transfusion_type")
    private String transfusionType;

    /**
     * 输血量
     */
    @TableField(value = "transfusion_volume")
    private String transfusionVolume;

    /**
     * 预定输血日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "scheduled_transfusion_time")
    private Date scheduledTransfusionTime;

    /**
     * 辐照血
     */
    @TableField(value = "is_irradiation_blood")
    private Integer isIrradiationBlood;

    /**
     * 过滤血
     */
    @TableField(value = "is_filtering_blood")
    private Integer isFilteringBlood;

    /**
     * 复检
     */
    @TableField(value = "is_recheck")
    private Integer isRecheck;

    /**
     * 接受标本时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "accept_sample_time")
    private Date acceptSampleTime;

    /**
     * 申请医师
     */
    @TableField(value = "apply_doctor")
    private String applyDoctor;

    /**
     * 主治医师
     */
    @TableField(value = "attending_physician")
    private String attendingPhysician;

    /**
     * 申请日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "apply_time")
    private Date applyTime;

    /**
     * 输血同意书是否签字
     */
    @TableField(value = "is_sign_consent_form")
    private Integer isSignConsentForm;

    /**
     * 受血者血液标本
     */
    @TableField(value = "recipient_specimen")
    private String recipientSpecimen;

    /**
     * 接收标本时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "receive_sample_time")
    private Date receiveSampleTime;

    /**
     * 逻辑删除
     */
    /**
     * 1代表删除，0代表未删除
     */
    @TableLogic
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = -2233933689683249301L;
}